<%-- 
    Document   : home
    Created on : Feb 10, 2014, 10:45:53 PM
    Author     : jocke
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@taglib prefix="template" tagdir="/WEB-INF/tags" %>

<stripes:layout-render name="/template/layout.jsp" pageTitle="Home">

    <stripes:layout-component name="html_head">
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/tree.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/product.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/libs/jquery.fixedheadertable.min.js"></script>
    </stripes:layout-component>

    <fmt:setBundle basename="StripesResources" />

    <stripes:layout-component name="leftbar">
        <div id="category-toolbar" class="btn-group">
            <button type="button" id="addProductButton" class="btn btn-default" >
                <span class="glyphicon glyphicon-plus"><fmt:message key="common.add" /></span>
            </button>
            <button type="button" id="removeProdCatButton" class="btn btn-default" >

                <span class="glyphicon glyphicon-minus"><fmt:message key="common.remove" /></span>
            </button>
            <button type="button" id="editProductLink" class="btn btn-default" >
                <span class="glyphicon glyphicon-edit"><fmt:message key="common.edit" /></span>
            </button>
        </div>

        <jsp:include page="category-tree.jsp" />

    </stripes:layout-component>

    <stripes:layout-component name="contents">
        <div>
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

                <div class="navbar-form navbar-left" role="search">
                    <div class="form-group">
                        <input id="search-field" type="text" class="form-control input-large" placeholder="<fmt:message key="common.search" />" >
                    </div>
                    <button type="button" class="btn btn-default" id="searchProductButton"><fmt:message key="common.search" /></button>
                    <div class="checkbox show-active">
                        <label>
                            <input type="checkbox" class="input-large" id="showActive"> 
                            <fmt:message key="product.show.active" />
                        </label>
                    </div>
                </div>
                <ul id="product-toolbar" class="nav navbar-nav navbar-right">
                    <li id="product-print"><button type="button" class="btn btn-default"><fmt:message key="common.print" /></button></li>
                    <li><button id="saveProductButton"  type="button" class="btn btn-default"><fmt:message key="common.save" /></button></li>
                    <li><button id="saveProductButton" type="button" class="btn btn-default"><fmt:message key="common.change" /></button></li>
                    <li><button id="removeProductButton" type="button" class="btn btn-default"><fmt:message key="common.remove" /></button></li>
                </ul>
            </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>
    <div class="table-wrapper">
        <table  id="product-table" class="table table-striped table-bordered table-condensed table-scrollable">
            <thead>
                <tr>
                    <th><input type="checkbox" id="select-all-products-checkbox"/></th>
                    <th><fmt:message key="common.status" /></th>
                    <th><fmt:message key="common.product" /></th>
                    <th><fmt:message key="common.quantity" /></th>
                    <th><fmt:message key="common.EAN" /></th>
                    <th><fmt:message key="common.price" /></th>
                    <th><fmt:message key="common.verified" /></th>
                    <th><fmt:message key="common.signature" /></th>
                </tr>
            </thead>
            <jsp:include page="product-table.jsp" />

        </table>
    </div>

    <div id="addCategory" class="modal fade">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
                    <h4 class="modal-title"><fmt:message key="product.add.category" /></h4>
                </div>
                <div class="modal-body">
                    <c:import url="/site/product/category-form.jsp" />
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><fmt:message key="common.close" /></button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
</div>

</stripes:layout-component>

</stripes:layout-render>